﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Neat;
using Neat.MenuSystem;
using Neat.EasyMenus;
using Neat.GUI;
using Neat.Mathematics;
using Neat.Graphics;

namespace NeatStarter
{
    public class SampleGUIScreen : Screen
    {
        public SampleGUIScreen(NeatGame Game)
            : base(Game)
        {
        }

        public override void Initialize()
        {
            base.Initialize();
            //Label hello = Form.NewControl("hello", new Label()) as Label;
            //hello.Caption = "Rattler Race!";
            //hello.Position = new Vector2(100, 100);
            //hello.ForeColor = Color.White;

            Button mybutton = Form.NewControl("mybutton", new Button()) as Button;
            mybutton.Caption = "Play";
            mybutton.Position = new Vector2(100, 200);
            mybutton.ForeColor = Color.White;
            mybutton.HoverTintColor = Color.Green;
            mybutton.Size = new Vector2(400, 70);
            mybutton.OnPress = mybutton_OnPress;

            Button resultsButton = Form.NewControl("resultsButton", new Button()) as Button;
            resultsButton.Caption = "Results";
            resultsButton.Position = new Vector2(100, 300);
            resultsButton.ForeColor = Color.White;
            resultsButton.HoverTintColor = Color.Green;
            resultsButton.Size = new Vector2(400, 70);
            resultsButton.OnPress = resultsButton_OnPress;

            Button optionsbutton = Form.NewControl("optionsbutton", new Button()) as Button;
            optionsbutton.Caption = "Options";
            optionsbutton.Position = new Vector2(100, 400);
            optionsbutton.ForeColor = Color.White;
            optionsbutton.HoverTintColor = Color.Green;
            optionsbutton.Size = new Vector2(400, 70);
            optionsbutton.OnPress = optionsbutton_OnPress;

            //Button highscorebutton = Form.NewControl("highscorebutton", new Button()) as Button;
            //highscorebutton.Caption = "Highscores";
            //highscorebutton.Position = new Vector2(100, 400);
            //highscorebutton.ForeColor = Color.White;
            //highscorebutton.HoverTintColor = Color.Green;
            //highscorebutton.Size = new Vector2(400, 70);
            //highscorebutton.OnPress = highscorebutton_OnPress;

            Form.HasMouse = true;
            game.ShowMouse = true;
        }
        //void highscorebutton_OnPress() {
        //    base.game.Console.Run("e_show resultscreen");
        //}

        void mybutton_OnPress()
        {
            base.game.Console.Run("e_show startlevelscreen");
            //Form.GetControl("hello").Caption = "Ouch!";
            //Form.GetControl("hello").ForeColor = Color.Red;
        }

        void resultsButton_OnPress()
        {
            base.game.Console.Run("e_show resultscreen");
        }

        void optionsbutton_OnPress()
        {
            base.game.Console.Run("e_show optionsscreen");
            //Form.GetControl("hello").Caption = "Ouch!";
            //Form.GetControl("hello").ForeColor = Color.Red;
        }
    }
}
